package com.zsxb.crm.mapper;

import com.github.pagehelper.Page;
import com.zsxb.crm.annotation.AutoFill;
import com.zsxb.crm.annotation.Log;
import com.zsxb.crm.dto.CourseDTO;
import com.zsxb.crm.dto.CoursePageDTO;
import com.zsxb.crm.enumeration.OperationType;
import com.zsxb.crm.pojo.Course;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CourseMapper {


    Page<Course> pageQuery(CoursePageDTO dto);

    Course getById(Long id);

    @AutoFill(OperationType.UPDATE)
    void update(Course course);

    void delete(String[] ids);

    @AutoFill(OperationType.INSERT)
    void add(Course course);


    List<Course> listselect(CourseDTO dto);

    @Select("select * from tb_course")
    List<Course> findAll();
}
